<?php  
/*
# ------------------------------------------------------------------------
# JA Job Board Package
# ------------------------------------------------------------------------
# Copyright (C) 2004-2010 JoomlArt.com. All Rights Reserved.
# @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
# Author: JoomlArt.com
# Websites: http://www.joomlart.com - http://www.joomlancers.com.
# ------------------------------------------------------------------------
*/

defined('_JEXEC') or die('Retricted Access');
JHTML::_('behavior.tooltip');

?>
<?php  global $mainframe;?>
<style type="text/css">
	td.key{
		font-weight:normal !important;
		text-align:left !important;
	}
	td.master{
		font-weight:bold !important;
	}
</style>

<script type="text/javascript">
	function showSection(value){
		if(value=='real_currency' || value==''){
			var items = $$('#currency_config .real');
			if(items.length>0  && value!=''){
				for(var i=0; i<items.length; i++){
					items[i].setStyle('display', '');
				}
			}
			items = $$('#currency_config .special');
			if(items.length>0){
				for(var i=0; i<items.length; i++){
					items[i].setStyle('display', 'none');
				}
			}
		}
		if(value=='special_currency' || value==''){
			var items = $$('#currency_config .real');
			if(items.length>0){
				for(var i=0; i<items.length; i++){
					items[i].setStyle('display', 'none');
				}
			}
			items = $$('#currency_config .special');
			if(items.length>0 && value!=''){
				for(var i=0; i<items.length; i++){
					items[i].setStyle('display', '');
				}
			}
		}
	}
	
	window.addEvent('domready', function(){showSection('<?php echo $this->params->get('mode')?>')});
</script>

<form action="index.php" method="post" name="adminForm">
<div class="col100">
	<fieldset class="adminform">
		<?php echo $this->getTabs();?>
	</fieldset>	
	<fieldset class="adminform">
		<legend><?php echo JText::_( 'General Config' ); ?></legend>		
		<table class="admintable" width="100%" id="currency_config">
		<tbody>			
			
			
			<tr>
				<td width="30%" class="key">
					<label for="currency"><?php echo JText::_( 'Currency' ); ?></label>:
				</td>
				<td width="70%">
					<input type="text" name="currency[currency]" value="<?php echo $this->params->get('currency');?>" id="currency" size="50">
					<font color="red"> *</font>
				</td>
			</tr>
			<tr>
				<td class="key "  width="30%" >
					<label for="currency_code"><?php echo JText::_( 'Currency Code' ); ?></label>:
				</td>
				<td  width="70%" >
					<input type="text" name="currency[currency_code]" value="<?php echo $this->params->get('currency_code');?>" id="currency_code"  size="50">
					<font color="red"> *</font>
				</td>
			</tr>
			
			<tr>
				<td width="30%" class="key">
					<label for="mode"  class="editlinktip hasTip" title="<?php echo JText::_( 'MODE TOOLTIP' ); ?>"><?php echo JText::_( 'Mode' ); ?></label>:
				</td>
				<td width="70%">
					<input type="radio" onclick="showSection(this.value)" <?php if($this->params->get('mode')=='real_currency') echo "checked";?> value="real_currency" name="currency[mode]" id="free_post_limit"/>
					<?php echo JText::_( 'Real currency' ); ?>
					
					<input type="radio" onclick="showSection(this.value)" <?php if($this->params->get('mode')=='special_currency') echo "checked";?> value="special_currency" name="currency[mode]"/>
					<?php echo JText::_( 'Special Currency' ); ?>
					<font color="red"> *</font>
				</td>
			</tr>
			<tr class="special">
				<td width="30%" class="key">
					<label for="currency_name"><?php echo JText::_( 'Name' ); ?></label>:
				</td>
				<td width="70%">
					<input type="text" name="currency[currency_name]" value="<?php echo $this->params->get('currency_name');?>" id="currency_name" size="50">
				</td>
			</tr>
			<tr class="special">
				<td width="30%" class="key">
					<label for="currency_symbol"><?php echo JText::_( 'Symbol' ); ?></label>:
				</td>
				<td width="70%">
					<input type="text" name="currency[currency_symbol]" value="<?php echo $this->params->get('currency_symbol');?>" id="currency_symbol" size="50">
				</td>
			</tr>
			
			
		</tbody>
		</table>
	</fieldset>
</div>
<div class="clr"></div>
<input type="hidden" name="option" value="<?php echo JBCOMNAME; ?>" />
<input type="hidden" name="view" value="jaconfiguration" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="tab" value="<?php echo $this->tab; ?>" />
<input type="hidden" name="cid" value="<?php echo $this->cid; ?>" />
<?php echo JHTML::_( 'form.token' ); ?>	
 </form>